<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/21
 * Time: 9:20
 */
var_dump($_GET);
var_dump($_POST);
$mobile = $_POST['m'];

if (preg_match('/^(13|15|18|17|19)[0-9]{9}$/',$mobile)){
//    $s1 = substr_replace($mobile,"****",3,4);
    $s1 = preg_replace('/(\d{3})(\d{4})(\d{4})/',"$1****$3",$mobile);
    var_dump($s1);
} else{
    echo "mobile is wrong";
}


